package cn.tedu.spring.example;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class TestUserXml {
    public static void main(String[] args) {
        /**
         * 1.创建 IoC容器;
         * 2.获取 Bean 对象;
         * 3.使用 Bean 对象；
         */
        ApplicationContext context = new ClassPathXmlApplicationContext("bean.xml");
        UserXml userXml = (UserXml) context.getBean("userXml");
        userXml.run();
    }
}
